def SuShu(x):
    for i in range(2, (x // 2)):
        if x % i == 0:
            return 0
    return 1

def main(y):
    if y != 4:
        for i in reversed(range(2, y // 2 + 1)):
            if SuShu(i):
                if SuShu(y - i):
                    print(i)
                    print(y - i)
                    break
    else:
        print('2')
        print('2')

while 1:
    try:
        main(int(input()))
    except:
        break